package com.canton.service.impl;
import com.canton.dao.entity.CultivationNode;
import com.canton.dao.repository.CultivationRepository;
import com.canton.service.CultivationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CultivationServiceImpl implements CultivationService{
    @Autowired
    private CultivationRepository cultivationRepository;


    @Override
    public CultivationNode findByName(String name) {
        return cultivationRepository.findByName(name);
    }

    @Override
    public List<CultivationNode> findAll() {
        return cultivationRepository.findAll();
    }

    @Override
    public List<CultivationNode> findByNameLike(String likes) {
        return cultivationRepository.findByNameLike(likes);
    }
}
